Skip to content

Tests: Cover erase personal data request flow in admin E2E - #15668

Open
shail-mehta wants to merge 2 commits into
WordPress:trunkfrom
shail-mehta:tests/52895-erase-personal-data-e2e
Open

shail-mehta wants to merge 2 commits into
WordPress:trunkfrom
shail-mehta:tests/52895-erase-personal-data-e2e

Conversation

@shail-mehta

@shail-mehta shail-mehta commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

Trac ticket: #52895

Adds an admin e2e test for creating an Erase Personal Data request from ticket #52895.

What

  • Creates a subscriber test user
  • Opens erase-personal-data.php
  • Submits a request by username with confirmation email unchecked
  • Asserts “Request added successfully.” and that the requester email appears in the list
  • Confirms the requester still appears after searching requests
  • Cleans up the request and user afterward (does not run the actual erase)

Why

Ticket #52895 / comment feedback: create a test user, add an erasure request, and verify they appear under Requester—without executing the destructive erase.

How

New Playwright spec: tests/e2e/specs/erase-personal-data.test.js, following existing admin e2e patterns.

Testing instructions

  1. Start the local environment if needed: npm run env:start
  2. Run: npm run test:e2e -- tests/e2e/specs/erase-personal-data.test.js
  3. Confirm the test passes and no leftover erase request / test user remains

Use of AI Tools

  • Cursor

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Both assertions check row visibility rather than the exact requester email link, so they can pass even if the Requester column no longer displays the address.

1 open issue
What changed in this PR

Adds admin end-to-end coverage for creating an Erase Personal Data request, supporting ticket #52895 without running the destructive erasure.

Changes:

  • Creates a temporary subscriber and submits a request by username with confirmation email disabled.
  • Checks the success notice and requester row before and after searching.
  • Adds teardown to delete the request and temporary user.
File Description
tests/​e2e/​specs/​erase-personal-data.test.js Adds request-creation coverage with user setup, list checks, and cleanup.

Review effort: Balanced

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are recorded for the added Erase Personal Data request-creation coverage.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@shail-mehta shail-mehta self-assigned this Nov 6, 2026
@shail-mehta
shail-mehta marked this pull request as ready for review November 6, 2026 14:23
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs.

Core Committers: Use this line as a base for the props when committing in SVN:

Props shailu25.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.


Props Bot commands

You can trigger Props Bot actions by commenting on this PR:

  • @propsbot add <username> to give props to a GitHub user. Requires write access.
  • @propsbot remove <username> to leave a user out of the props. Requires write access.
  • @propsbot refresh to refresh this list. Adding the props-bot label works too.

@lancewillett lancewillett left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @shail-mehta. Adding a request from the form is not covered yet, and creating your own user keeps it safe in parallel.

This spec and #15688 (export) are the same test on two screens: the same setup, cleanup, steps and checks, apart from the screen, the checkbox label and the username prefix. Please combine them into one spec that loops over both screens, the way taxonomies.test.js loops over categories and tags, and close the other PR. That halves the code to maintain.

AI review · claude-opus-5-5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants